<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('分账接收方类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', ["MERCHANT_ID"=>__('商户'), 'PERSONAL_OPENID'=>__('个人')],$row['type'])}
        </div>
    </div>

    <div class="form-group">
        <label for="account" class="control-label col-xs-12 col-sm-2">{:__('分账接收方账号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="account" name="row[account]" value="{$row.account|htmlentities}" data-rule="required" />
            <strong style="color: red">分账接收方类型是商户，是mch_id，分账接收方类型是个人时，是openid</strong>
        </div>
    </div>
    <div class="form-group">
        <label for="account" class="control-label col-xs-12 col-sm-2">{:__('分账接收方全称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="full_name" name="row[full_name]" value="{$row.full_name|htmlentities}" />
            <strong style="color: red">分账接收方类型是商户，商户全称（必传），分账接收方类型是个人时，是个人姓名（选传）</strong>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('参与分账')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[state]', [1=>__('参与'), 2=>__('不参与')],$row['state'])}
        </div>
    </div>
    <div class="form-group">
        <label for="name" class="control-label col-xs-12 col-sm-2">{:__('联系姓名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="name" name="row[name]" value="{$row.name|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="mobile" class="control-label col-xs-12 col-sm-2">{:__('手机号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="mobile" name="row[mobile]" value="{$row.mobile|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="store_id" class="control-label col-xs-12 col-sm-2">{:__('商户号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control selectpage" data-source="separate_accounts/business_listings/store_list"
                   id="store_id" name="row[store_id]"  value="{$row.store_id|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="group_id" class="control-label col-xs-12 col-sm-2">{:__('身份')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control selectpage" data-source="separate_accounts/group/store_list"
                   id="group_id" data-field="group_name" name="row[group_id]"  value="{$row.group_id|htmlentities}" data-rule="required" />
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
